<%@page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib uri="TowkerTagLib" prefix="rbac"%>
<%@ taglib uri="/WEB-INF/tags/CommonFunction.tld" prefix="cfn" %>  
<%@include file="/commons/include/html_doctype.html" %>
<html>
<head>
	<title>TK_DELIVERIES</title>
	<%@include file="/commons/include/get.jsp" %>
	<script type="text/javascript">
		//放置脚本
		function openCopyOrder(){
			var source = encodeURIComponent(ctx+"/manage/sell/getCopyOrder.htm?typeid=&classId=&r=" + Math.random());
			var url = ctx + "/commons/showDialog.jsp?r=" + Math.random() + "&url=" + source;
			var r = window.showModalDialog(url, this, "dialogWidth=600px;dialogHeight=600px;scroll=no");
			if(r)
				location.reload();
		}
	</script>
    <script type="text/javascript" src="${ctx}/js/calendar/My97DatePicker/WdatePicker.js"></script>
</head> 
<body>
<table border="0" cellspacing="0" cellpadding="0" class="listLogo">
	<tr>
		<td class="title">送货单</td>
		<td>
			<div class="menuTool">
			<a class="add" href="#"  OnClick="openCopyOrder();">复制订单</a>
			<a class="del" id="listFormDelAll" href="delDelivery.htm">删除所选</a>
			<a class="add" href="addDelivery1.htm">添加</a>
			<a class="back" onClick="javascript:history.back();" href="#">返回</a>
			</div>
		</td>
	</tr>
</table>
<div class="line"></div>
<form id="queryForm" method="post" action="getDelivery.htm">
<table border="0" cellspacing="0" cellpadding="0" class="queryTable">
	<tr>
		<td class="title">送货单号：</td>
		<td class="input"><input id="title" name="delivery_sn" class="input" value="${fn:escapeXml(param.delivery_sn)}" /></td>
		<td class="input"><span class="title">订单号：</span></td>
		<td class="input"><input id="title2" name="order_code" class="input" value="${fn:escapeXml(param.order_code)}" /></td>
		<td class="input"><span class="title">客户代码：</span></td>
		<td class="input"><input id="title3" name="custom_code" class="input" value="${fn:escapeXml(param.custom_code)}" /></td>
		<td class="input"><span class="title">制单日期：</span></td>
		<td class="input"><input id="title4" name="create_date" class="input Wdate" value="${fn:escapeXml(param.create_date)}"readonly="readonly" onFocus="WdatePicker({isShowWeek:true})" /></td>
		<td class="input">&nbsp;</td>
		<td class="input">&nbsp;</td>
	</tr>
	<tr>
		<td class="query" colspan="10"><input id="_querySubmit_" type="submit" class="button" value="查询" /></td>
	</tr>
</table>
</form>
<div class="line"></div>
<form id="listForm" method="post" action="delDelivery.htm">
<table border="0" cellspacing="1" cellpadding="0" class="listTable">
	<tr class="list_title">
		<td style="width:3%"><input id="chkall" type="checkbox" /></td>
		<td>送货单号</td>
		<td>订单号</td>
		<td>客户名称</td>
		<td>订单日期</td>
		<td>所属公司代码</td>
		<td>复制状态</td>
		<td>操作</td>
	</tr>
<c:forEach items="${pageModel.result}" var="d" varStatus="status">
	<tr class="${status.index%2==0?'list_even':'list_odd'}">
		<td nowrap="nowrap">
		<c:if test="${d.copy_status == 0}">
			<input name="keyIndex" type="checkbox" value="${d.id}" />
		</c:if>
		</td>
		<td>${fn:escapeXml(d.delivery_sn)}</td>
		<td>${fn:escapeXml(d.order_code)}</td>
		<td>${fn:escapeXml(d.customs_name)}</td>
		<td><fmt:formatDate pattern="yyyy-MM-dd" value="${d.order_date}" /></td>
		<td>${fn:escapeXml(d.co_code)}</td>
		<td>
			 <c:if test="${d.copy_status == 0}">
			 未复制
			 </c:if>
			 <c:if test="${d.copy_status == 1}">
			 已复制
			 </c:if>
		
		</td>
		<td>
			<div class="menuTool">
            <c:if test="${d.copy_status == 0}">
			<a class="del" href="delDelivery.htm?keyIndex=${d.id}">删除</a>
			<a class="upd" href="updDelivery1.htm?keyIndex=${d.id}">修改</a>
            </c:if>
			<a class="get" href="getDeliveryById.htm?keyIndex=${d.id}">详细</a>
			</div>
		</td>
	</tr>
</c:forEach>
</table>
<input id="_submit_" type="submit" style="display:none;" />
</form>
<table border="0" cellspacing="0" cellpadding="0" class="bottomTable">
	<tr><td>${pageNav.page}</td></tr>
</table>
</body>
</html>
